using System;
using Machine.Migrations;

public class MovePhoneToContacts : SimpleMigration
{
	public override void Up()
	{
		Schema.AddColumn("Contacts","Phone",typeof(string),100,true);
		Database.ExecuteNonQuery("Update Contacts set Phone = (select Phone from Customers where Id = CustomerId)");
		Schema.RemoveColumn("Customers","Phone");
	}

	public override void Down()
	{
		throw new NotImplementedException();
	}
}